<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let x = /abc/;
        let str1 = "abc  hh hh abc"
       // let y = x.test(str)
       // console.log(y)

       // let z = x.exec(str)//返回匹配结果的数组
        //console.log(z)

        //let z = str1.match(x)
        //console.log(z)

       // let y = str1.replace(x,/ww/)//取代
        //console.log(y)

        let text = 'hihi oo pp a'
        let part=text.split(/i/)//切割
        console.log(part)

        
    </script>
</body>
</html>